<template>
    <div>
        <el-table :data="data" style="width: 100%">
            <el-table-column prop="date" label="日期" width="180">
            </el-table-column>
            <el-table-column prop="name" label="姓名" width="180">
            </el-table-column>
            <el-table-column prop="address" label="地址">
            </el-table-column>
        </el-table>
        <el-pagination background layout="prev, pager, next" :total="data.length" :page-size="5" @current-change="change"></el-pagination>
    </div>
</template>
<script>
import { Table, TableColumn, Pagination } from 'element-ui';
export default {
    props:{
        data:Array
    },
    data() {
        return {
            
        }
    },
    methods:{
        change(current){
            this.$emit('getData',current);
        }
    },
    components: {
        'el-table': Table,
        'el-table-column': TableColumn,
        'el-pagination': Pagination
    }
}
</script>